<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const num = 12.52;
        console.log(num.toFixed());//13
        console.log(num.toFixed(3));//12.520
        const num1 = 12;
        console.log(num1.toFixed(2));//12.00
    </script>
</body>

</html>